Sorting 2D And 3D Shapes